package com.xiaoshuidi.cloud.framework.kingdee.config;

import lombok.Data;
import org.hibernate.validator.constraints.URL;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 金蝶配置
 */
@ConfigurationProperties(prefix = "lease.kingdee")
@Validated
@Data
public class KingdeeProperties {
    @NotEmpty(message = "金蝶Webservice地址不能为空")
    @URL(message = "金蝶Webservice地址必需是 URL")
    private String serverAddr;
    @NotNull(message = "dbType不能为空[0:Sqlserver, 1:oracle]")
    private Integer dbType;
    @NotEmpty(message = "dcName不能为空")
    private String dcName;
    @NotEmpty(message = "dcName不能为空")
    private String slnName;
    @NotEmpty(message = "dcName不能为空")
    private String userName;
    @NotEmpty(message = "dcName不能为空")
    private String password;
    private String language = "L2";
    private String authPattern = "BaseDB";
}
